import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'logger_level.dart';
import 'zendesk_plugin_method_channel.dart';

abstract class ZendeskPluginPlatform extends PlatformInterface {
  /// Constructs a ZendeskPluginPlatform.
  ZendeskPluginPlatform() : super(token: _token);

  static final Object _token = Object();

  static ZendeskPluginPlatform _instance = MethodChannelZendeskPlugin();

  /// The default instance of [ZendeskPluginPlatform] to use.
  ///
  /// Defaults to [MethodChannelZendeskPlugin].
  static ZendeskPluginPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [ZendeskPluginPlatform] when
  /// they register themselves.
  static set instance(ZendeskPluginPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<bool?> initZendeskSDK({required String zendeskIdentifier}) {
    throw UnimplementedError('initZendeskSDK() has not been implemented.');
  }

  Future<bool?> pushToConversation() {
    throw UnimplementedError('pushToConversation() has not been implemented.');
  }

  Future<int?> getUnreadCount() {
    throw UnimplementedError('getUnreadCount() has not been implemented.');
  }

  Future<bool?> setLoggerEnabled(bool enabled) {
    throw UnimplementedError('setLoggerEnabled() has not been implemented.');
  }

  Future<bool?> setLoggerLevel({
    required ZendeskLoggerLevel level,
  }) {
    throw UnimplementedError('setLoggerLevel() has not been implemented.');
  }
}
